<template>
  <div>
    <!-- 尾部 -->
    <div class="footer">
      <div class="address">
        {{this.address}}
      </div>
      <div class="copyRight">
        {{this.copyRight}}
      </div>
    </div>
    <!-- /尾部 -->
  </div>
</template>
<script>
import {get,post} from '@/utils/request.js'
export default {
  data(){
    return{
      // 存放地址
      address:'',
      // 版权所有
      copyRight:''
    }
  },
  methods: {
    // 请求地址和版权
    loadAdress(){
      get('/index/findByKey',{name:'address'}).then(res=>{
        console.log(res,'获取地址');
        this.address=res.data.val;
      })
    },
    loadcopyRight(){
      get('/index/findByKey',{name:'copyRight'}).then(res=>{
        console.log(res,'获取版权所有');
        this.copyRight=res.data.val;
      })
    }
  },
  created(){
    this.loadAdress();
    this.loadcopyRight();
  }
}
</script>
<style lang="scss">
// 尾部样式
.footer {
  // 文字居中
  text-align: center;
  height: 100px;
  background-color: #003262;
  color: #ecf6f2;
}
</style>